package org.glutenberg.util;

import java.util.Vector;

public class StringUtils {
	
	public static Vector split(String original, String separator) {
		Vector nodes = new Vector();
		// Parse nodes into vector
		int index = original.indexOf(separator);
		while(index>=0) {
			nodes.addElement( original.substring(0, index) );
			original = original.substring(index+separator.length());
			index = original.indexOf(separator);
		}
		// Get the last node
		nodes.addElement( original );

		return nodes;
	}
	
	public static Vector split(String original) {
		return split(original," ");
	}
}
